package com.authservice.authservice.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.authservice.authservice.domain.User;
import com.authservice.authservice.service.UserService;
import com.authservice.authservice.mapper.UserMapper;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author admin
* @description 针对表【user】的数据库操作Service实现
* @createDate 2025-04-07 11:33:11
*/
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService{

    @Resource
    private UserMapper userMapper;

    @Override
    public User getByPhone(String account) {
        return userMapper.getByPhone(account);
    }

    /**
     * 新增用户
     * @param user
     */
    @Override
    public void add(User user) {
        userMapper.add(user);
    }

    /**
     * 用户列表
     * @param user
     * @return
     */
    @Override
    public List<User> userList(User user) {
        return userMapper.userList(user);
    }
}




